<extend name="Base/mob_common"/>
<block name="mob_body">
    <link rel="stylesheet" href="__CSS__/apps/shop.css"/>
    <script src="__JS__/shop.js"></script>
    <div class="mymailbox-container ">
        <div data-am-widget="tabs" class="am-tabs am-tabs-d2"style="margin: 0px;">
            <ul class="am-tabs-nav am-cf">
                <li class="am-active">
                    <a href="[data-tab-panel-0]">未完成的订单</a>
                </li>
                <li class="">
                    <a href="[data-tab-panel-1]">已完成的订单</a>
                </li>
            </ul>
            <!--收到的信息-->
            <div class="am-tabs-bd">
                <div data-tab-panel-0 class="am-tab-panel am-active">
                    <div class="shop-container">
                        <ul class="am-g  shop-list am-avg-sm-2 am-avg-md-4 am-avg-lg-5 ulclass" style="margin:0 auto">
                            <notempty name="goods">
                                <volist name="goods" id="vo">
                                    <include file="_goodsbuylist"/>
                                </volist>
                                <else/>
                                <div class="am-text-center" style="background-color:#FFFFFF;margin-top: -15px"><img
                                        src="__IMG__/tip.png" style="width: 100%;height: 100%">
                                </div>
                            </notempty>
                        </ul>
                    </div>
                    <if condition="$pid['count'] eq 1">
                        <div class="am-list-news-ft look-more">
                            <a id="getmoregoodsnotbuy" data-url="{:U('Mob/shop/addMoreGoodsOrder')}"
                              data-type-id="{$typeId}">查看更多 &raquo;</a>
                        </div>
                    </if>
                </div>
                <!--发送的信息-->
                <div data-tab-panel-1 class="am-tab-panel ">
                    <div data-tab-panel-0 class="am-tab-panel am-active">
                        <div class="shop-container">
                            <ul class="am-g  shop-list am-avg-sm-2 am-avg-md-4 am-avg-lg-5 ullist" style="margin:0 auto">
                                <notempty name="goodshasbuy">
                                    <volist name="goodshasbuy" id="vo">
                                        <include file="_goodsbuylist"/>
                                    </volist>
                                    <else/>
                                    <div class="am-text-center" style="background-color:#FFFFFF;margin-top: -15px"><img
                                            src="__IMG__/tip.png" style="width: 100%;height: 100%">
                                    </div>
                                </notempty>
                            </ul>
                        </div>
                </div>
                    <if condition="$pid['countHasBuy'] eq 1">
                        <div class="am-list-news-ft look-more">
                            <a id="getmoregoodshasbuy" data-url="{:U('Mob/shop/addMoreGoodsOrder')}"
                               data-type-id="{$typeId}">查看更多 &raquo;</a>
                        </div>
                    </if>

            </div>
        </div>
    </div>
<script>
    get_more_goods_list();
</script>
    <script>
        $(function () {
            $('#cat_top').change(function () {
                var pid = $(this).val();
                $.post("{:U('Mob/cat/selectDropdown')}", {pid: pid}, function (data) {
                    $('#cat_second').html('');
                    $.each(data, function (index, element) {
                                $('#cat_second').append('<option value="' + element.id + '">' + element.title + '</option>')
                            }
                    )
                }, 'json');
            });
            $('#cat_top').change();
        })
    </script>

</block>